import type { NextRequest } from "next/server";
import { NextResponse } from "next/server";
import manager from "../../../../test/json-serv";
import { IFile } from '@/types'
export function GET(request: NextRequest) {
    const searchParams = request.nextUrl.searchParams;
    const id = searchParams.get("id") || null;
    const result = manager.getFileById(id) as IFile;
    return NextResponse.json<IFile>(result || {});
}
